/* YkdsNWRTQmllU0JpWVhObE5qUT0= */
$(function(){
	//手风琴效果
	$(".accordion ul li").each(function(){
		var fold = $(this).find(".fold");
		var unfold = $(this).find(".unfold");
		if(fold.is(":hidden")){
			$(this).width(588);
		}else{
			$(this).width(186);
		}
	});
	$(".accordion ul li").mouseenter(function(){
		var li_index = $(this).index();
		$(this).stop().animate({width:588},500);
		$(this).find(".unfold").show();
		$(this).find(".fold").hide();
		$(this).siblings().stop().animate({width:186},500);
		$(this).siblings().find(".unfold").hide();
		$(this).siblings().find(".fold").show();
	});
	setTimeout(function(){
		var box = document.getElementById("marquee"), can = true; 
		box.onmouseover = function(){ can = false }; 
		box.onmouseout = function(){ can = true }; 
		new function (){ 
			var stop = box.scrollTop % 26 == 0 && !can;
			if(!stop){
				box.scrollTop++;
			}
			if(box.scrollTop % 26){
				setTimeout(arguments.callee, 10); 
			} else {
				if($("#marquee").prop("scrollHeight") == (box.scrollTop + 26)){
					var func = arguments.callee;
					setTimeout(function(){ box.scrollTop = 0; setTimeout(func, 5000);}, 5000);
				} else {
					setTimeout(arguments.callee, 5000);
				}
			}
		}; 
	}, 5000)
	//底部缩略图
	var carrousel = $(".carrousel");
	$(".portrait").click(function(e) {
		var src = $(this).find(".pic1").attr("data-src-wide");
		carrousel.find(".zs_big").attr("src", src);
		carrousel.fadeIn(200);
	});
	carrousel.find(".zs_big").click(function(e) {
		carrousel.fadeOut(200);
	});
	carrousel.find(".close_thumb_pic").click(function(e) {
		carrousel.fadeOut(200);
	});
})
